package com.tuanzi.loan.web.bean.statistics;

import com.google.common.collect.Lists;
import com.tuanzi.loan.business.constants.DictionaryCode;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.vo.request.statistics.StatNotRegisterLoginRequest;
import com.tuanzi.loan.vo.response.statistics.StatNotRegisterLoginResponse;
import com.tuanzi.loan.web.configuration.JSFListingBean;
import com.tuanzi.loan.web.lazy.statistics.StatNotRegisterLoginDataLazyModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;
import java.util.List;

/**
 * User: liangZongXi
 * Create time: 15:52 2019/10/9
 * Description:
 */
@Data
@Debug
@Component
@ViewScoped
@EqualsAndHashCode(callSuper = true)
public class StatNotRegisterLoginBean extends JSFListingBean<StatNotRegisterLoginRequest, StatNotRegisterLoginResponse> {
    private static final long serialVersionUID = -4469057106292467325L;

    @PostConstruct
    private void init(){
        initLazyDataModel();
    }

    private void initLazyDataModel() {
        $ = new StatNotRegisterLoginRequest();
        lazyDataModel = new StatNotRegisterLoginDataLazyModel($);
    }

    public void onReset(){
        initLazyDataModel();
    }

    @Override
    protected List<String> getDictionaryCodes() {
        return Lists.newArrayList(DictionaryCode.LARGE_COMMON_PRODUCT);
    }
}
